var PopupBox = EventDispatcher.extend({

	content: null,
	overlay: null,
	popupBoxContainer: null,

	constructor: function(newContent)
	{
		this.content = newContent;
		this.overlay = $('#overlay');
		this.popupBoxContainer = $('#editorPopup');
	},

	show: function()
	{
		this.popupBoxContainer.html(this.content);
		this.popupBoxContainer.css('display', 'inline-block');
		this.overlay.fadeIn();
	},

	hide: function(evt)
	{
		if (evt != undefined)
		{
			evt.preventDefault();
		}
		this.overlay.fadeOut(400, handler(this, 'onOverlayFadeOut'));
	},

	onOverlayFadeOut: function()
	{
		//alert("hello");
		this.dispatchEvent('hidden');
	}
});